// Learn cc.Class:
//  - [Chinese] http://www.cocos.com/docs/creator/scripting/class.html
//  - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/class/index.html
// Learn Attribute:
//  - [Chinese] http://www.cocos.com/docs/creator/scripting/reference/attributes.html
//  - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/reference/attributes/index.html
// Learn life-cycle callbacks:
//  - [Chinese] http://www.cocos.com/docs/creator/scripting/life-cycle-callbacks.html
cc.Class({
    extends:cc.Component,
    properties: {
        // foo: {
        //     // ATTRIBUTES:
        //     default: null,        // The default value will be used only when the component attaching
        //                           // to a node for the first time
        //     type: cc.SpriteFrame, // optional, default is typeof default
        //     serializable: true,   // optional, default is true
        // },
        // bar: {
        //     get () {
        //         return this._bar;
        //     },
        //     set (value) {
        //         this._bar = value;
        //     }
        // },
        type:cc.String,
       
      startPoint_x:cc.Integer,
      startPoint_y:cc.Integer,
       map:cc.Node,
       distance:100,
      
        startPoint:{
            get(){
                return this._startPoint;
            },
            set(value){
                this._startPoint = value;
            }
        },
        currentPoint:{
            get(){
                return this._currentPoint;
            },
            set(value){
                this._currentPoint = value;
            }
        },
        targetPoint:{
            get(){
                return this._targetPoint;
            },
            set(value){
                this._targetPoint = value;
            }
        }
    },

    // LIFE-CYCLE CALLBACKS:

    onLoad () {
       
    },

    start () {

    },
    myclickfunction(){
      this.node.getComponent(cc.Animation).play("flash");
    },
    movetoPos(){
        var actionBy = cc.moveTo(2, cc.p(80, 80));
    }
  
});

